<?php
//CSS - Markitup
echo $this->Html->css(array('nivo/themes/default/default', 'nivo/themes/orman/orman', 'nivo/themes/pascal/pascal', 'nivo/nivo-slider'), false);
//Javascript
//Nivo
echo $this->Html->script(array('plugins/jquery.nivo.slider'), false);


$this->Html->scriptStart(array('inline' => false));
echo '
      $(function(){
        $("#slider").nivoSlider({pauseTime: 5000});
        });
       ';
$this->Html->scriptEnd();
?>

<style type="text/css">
    .nivoSlider {
      width : <?php echo Configure::read("App.homepageImageWidth");?>px;
      height : <?php echo Configure::read("App.homepageImageHeight");?>px;
      float: left;
      margin-left:100px;
    }

</style>

<div id="homeDipsplaySection">
<?php if(isset($photos) && !empty($photos)) { ?>
  <div class="slider-wrapper theme-default">
    <div class="ribbon"></div>
    <div id="slider" class="nivoSlider">
      <?php foreach ($photos as $photo) {
        $rec = $photo['HomepagePhoto'];
        echo   $this->Html->image($rec['image_path'], array('alt' => $rec['caption'], 'title'=>$rec['caption']));
      }
      ?>
    </div>
    <div id="htmlcaption" class="nivo-html-caption">
    </div>
  </div>

<?php } ?>

  <div id="announcementSection">
    <aside>
    <header>
      <h1>Classes</h1>
    </header>
     <section>
      <p>
        CIKC holds <?php echo $this->Html->link('handling classes', array('controller'=>'contents','action'=>'classes'));?> for those interested in showing their dogs in Conformation Events.
      </p>
    </section>
    </aside>
  </div>
</div>

<?php
   if(isset( $contents['Content']['info'])) {
     echo '<div id="homeContent">';
     echo nl2br($contents['Content']['info']);
     echo '</div>';
   }
?>
